﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Manage.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="web.Manage.Cash_coupon._default" %>

<%@ Import Namespace="PRO.Common" %>
<%@ Register Assembly="PRO.Controls" Namespace="PRO.Controls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style1 { height: 33px; }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_PageInfo" runat="server">
    现有礼品卡
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder_Menus" runat="server">
    <li><a href="edit.aspx">添加礼品卡</a></li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder_Content" runat="server">
    <form id="form1" runat="server">
        <table class="tab" style="width: 100%;">
            <tr>
                <th>卡号</th>
                <th>面额</th>
                <th>状态</th>
                <th>创建时间</th>
                <th>使用时间</th>
                <th style="width:130px;">操作</th>
            </tr>
            <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("cardnumber") %></td>
                        <td><%#Eval("cashprice") %></td>
                        <td><%#GetStatus(Eval("status")) %></td>
                        <td><%#Eval("createtime") %></td>
                        <td><%#(Eval("status").ToString().ToInt(0)<2)?"未使用":Eval("usetime") %></td>
                        <td>
                            <asp:LinkButton CommandArgument='<%#Eval("id") %>' CommandName="status" ID="LinkButton2" Visible='<%#(Eval("status").ToInt(0)==0)?true:false %>' OnClientClick="return confirm('您确定要设为已经售出吗？');" runat="server">设为已售出</asp:LinkButton>
                            <asp:LinkButton CommandArgument='<%#Eval("id") %>' CommandName="del" Visible='<%#(Eval("status").ToInt(0)==0)?true:false %>' ID="LinkButton1" runat="server" OnClientClick="return confirm('您确定要删除吗？');">删除</asp:LinkButton>
                            <%#(Eval("status").ToInt(0)>0)?"售出后不能再操作":"" %>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>

        <cc1:Pager ID="Pager1" PagerLanguage="CH" OnPageIndexChanging="Pager1_PageIndexChanging" PagerStyle="Button" runat="server" />
    </form>
</asp:Content>
